home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
crwtim
/
time_2.txt
< prev
next >
Wrap
Text File
|
1994-04-22
|
587b
|
27 lines
// Time Format for CRYSTAL Reports (24:00 format)
//
// Convert MS ACCESS Time to Whole Number
NumberVar TotWholeNbr:={Time.Time}*100000000;
// Calculate Hours
NumberVar Hours:=Truncate(TotWholeNbr/4166666.64);
// Calculate Minutes
NumberVar Mins:=Truncate((TotWholeNbr-(Hours*4166666.64))/69444.444);
// Set Hour String
If Hours<10 Then
StringVar HH:="0"+ToText(Hours)
Else
StringVar HH:=ToText(Hours);
// Set Minute String
If Mins<10 Then
StringVar MM:="0"+ToText(Mins)
Else
StringVar MM:=ToText(Mins);
// Output Time
HH[1 to 2]+":"+MM[1 to 2];